package com.example.roledepartment.service.impl;

import com.example.common.entity.sys.SysRole;
import com.example.roledepartment.mapper.SysRoleMapper;
import com.example.roledepartment.service.ISysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色信息表 服务实现类
 * </p>
 *
 * @author cc
 * @since 2022-08-12
 */
@Service
public class SysRoleServiceImpl implements ISysRoleService {

    @Autowired
    private SysRoleMapper roleMapper;

    /**
     * 通过用户id查询角色信息
     * @param userId
     * @return
     */
    @Override
    public List<SysRole> getRolesByUserId(Long userId) {
        return roleMapper.getRolesByUserId(userId);
    }
}
